Setup

This file was automatically created via the Repro package (version 0.1.0) using R version 4.0.1 (2020-06-06)

# check_git()
# check_make()
# check_docker()

Description

Parametric Bootstrap Test method to evaluate significance of fixed effects in mixed-effects models (using MLE fit, nsim = 5000) and Bayes Factor from mixed models (see Wagenmakers, 2007)

Demographics

egltable(c("BMI", "AGE", "GENDER"), 
  g = "intervention", data = df, strict = FALSE) %>%
  kbl(caption ="Summary statistics", digits = 2) %>%
  kable_styling(latex_options = "HOLD_position", position = "center", full_width = F) %>%
  row_spec(0,bold=T,align='c')
Summary statistics
Placebo M (SD)/N (%) Liraglutide M (SD)/N (%) Test
BMI -0.20 (0.91) 0.00 (0.90) t(df=47) = -0.78, p = .438, d = 0.22
AGE 40.27 (13.74) 38.61 (11.72) t(df=47) = 0.45, p = .653, d = 0.13
GENDER Chi-square = 0.35, df = 1, p = .556, Phi = 0.08
Men 10 (38.5) 7 (30.4)
Women 16 (61.5) 16 (69.6)

Biomedical data

Variable Selection

Box-plot of all biomedical predictors per intervention.

Box-plot of all biomedical predictors per intervention.


Using penalized (lasso) maximum likelihood for variable selection (cv.glmnet), i.e. finding the minimum lambda (regularization parameter) to infer the best number of features to use in order to simplify the model and avoid overfitting.
Using that because:
- Handles the problem of correlated inputs - Perform better than stepwise selection

## [1] "BW_diff"       "BMI_diff"      "X2.AG_diff"    "reelin_diff"  
## [5] "MCP_diff"      "TNFalpha_diff" "GLP_diff"      "Glu_diff"

Mediation analysis (biomedical)

Mediation Analysis: DV = Weight loss, IV = Intervention
Estimates 95% CI p
Indirect effect mediated through X2.AG_diff -0.023 (-0.313, 0.242) 0.848
Indirect effect mediated through reelin_diff -0.105 (-0.580, 0.270) 0.592
Indirect effect mediated through MCP_diff 0.002 (-0.199, 0.207) 0.990
Indirect effect mediated through TNFalpha_diff -0.033 (-0.271, 0.121) 0.716
Indirect effect mediated through GLP_diff 0.075 (-0.500, 0.669) 0.814
Indirect effect mediated through Glu_diff -0.373 (-0.979, 0.079) 0.112
Direct effect 3.180 (0.976, 5.493) 0.006
Total effect 2.826 (0.157, 5.522) 0.030

Weight Loss

res$p.value = as.numeric(res$p.value)
res$p.value = ifelse(res$p.value < 0.05,paste("<span style=\" font-weight: bold; \" >" ,sprintf("%.3f",res$p.value), "</span>"),  paste("<span>" ,sprintf("%.3f",res$p.value), "</span>"))

res$F = unlist(str_split(gsub("[^0-9.,-]", "", res$F), ","));res$pes = unlist(str_split(gsub("[^0-9.,-]", "", res$pes), ","));
res$`90% CI` = paste(sprintf("%.3f",PES.weight[,2]), "-", sprintf("%.3f",PES.weight[,3]))

res$p.value[1]= "<span style=\" font-weight: bold;    \" >\u003C 0.001</span>"
res$pes[4]= "\u003C 0.001"
colnames(res)[3:5] = c( paste("F(", res$df[1], ")", sep=""),"&eta;<sub>p</sub><sup>2</sup>", "p")
res[c(1,4,6,3,5)]  %>% kbl(digits = 2, escape = F) %>%
  kable_styling(latex_options = "striped", position = "center", full_width = F) 
Effect ηp2 90% CI F(1, 42) p
intervention .506 0.316 - 0.624 43.00 < 0.001
gender .011 0.000 - 0.108 0.46 0.500
age .095 0.002 - 0.245 4.41 0.042
Date_diff < 0.001 0.000 - NA 0.00 0.971
#print('PES: intervention: Overall higher weight loss for treament (Liraglutide) group')
#PES.weight[1,]
Model assumptions.Model assumptions.Model assumptions.Model assumptions.

Model assumptions.

Weight Loss by intervention.

Weight Loss by intervention.



Pavlvovian Conditioning Task (Latency)

Latency = time to detect the target (ms) & condition = CS+ or CS-


tables <- list.clean(readHTMLTable("tmp/temp1.html"), fun = is.null, recursive = FALSE)
tables2 = tables[[1]] %>% janitor::row_to_names(row_number = 1)

tables2 <- as.matrix(tables2) %>% as_tibble()
tables2[is.na(tables2)] <- ""
tables3 = tables2[1:length(table$Effect),1:4] 
tables3[5] = str_split(gsub("[^0-9.,-]", "", table[3]), ",")[[1]]; tables3[6] = as.numeric(str_split(gsub("[^0-9.,-]", "", table[4]), ",")[[1]]); 
tables3$...6 = ifelse(tables3$...6 < 0.05,paste("<span style=\" font-weight: bold; \" >" ,sprintf("%.3f",tables3$...6), "</span>"),  paste("<span>" ,sprintf("%.3f",tables3$...6), "</span>"))
colnames(tables3)[5] = "\u03C7\u00B2"; colnames(tables3)[6] = "p"
tables3$p[1]= "<span style=\" font-weight: bold;    \" >\u003C 0.001</span>"
tables3 %>%   
  kbl(caption ="Latency (ms)",escape = F) %>%
  kable_styling(latex_options = "HOLD_position", position = "center", full_width = F) %>%  row_spec(0,bold=T,align='c')
Latency (ms)
Predictors Estimates std. Error CI χ² p
condition [1] 13.39 2.93 7.65 – 19.14 17.69 < 0.001
intervention [1] -16.75 12.75 -41.74 – 8.23 1.64 0.200
session [1] -7.76 8.42 -24.26 – 8.75 0.84 0.358
age 30.28 11.83 7.09 – 53.47 5.74 0.017
gender [1] -6.94 12.14 -30.74 – 16.85 0.32 0.574
BMI_V1 -14.63 11.90 -37.96 – 8.69 1.37 0.241
thirsty 28.66 11.39 6.33 – 50.99 5.51 0.019
hungry -20.10 11.41 -42.45 – 2.25 3.01 0.083
condition [1] *intervention [1] -1.00 2.94 -6.76 – 4.75 0.11 0.735
condition [1] * session[1] -4.07 2.72 -9.40 – 1.25 2.16 0.141
intervention [1] *session [1] -11.75 8.38 -28.17 – 4.68 1.89 0.170
condition [1] * age -5.41 2.64 -10.58 – -0.25 3.97 0.046
(condition [1] intervention [1]) session [1] -2.08 2.72 -7.40 – 3.24 0.58 0.448
tmp = tables2[(length(table$Effect)+1):(length(table$Effect)+5),1:2]
names(tmp) <- NULL
tmp1 <- data.frame(t(tmp[-1]))
colnames(tmp1) <- tmp[[1]]
tmp1 %>% kbl(digits = 2) %>%
  kable_styling(latex_options = "HOLD_position", position = "center", full_width = F) 
ICC N id N trialxcondition Observations Marginal R2 / Conditional R2
0.43 64 20 3888 0.067 / 0.472

Model assumptions.Model assumptions.Model assumptions.Model assumptions.

Model assumptions.



Latency by pavlvovian cue.

Latency by pavlvovian cue.

(Part 2) Pavlvovian Conditioning Task (Pleasantness Ratings)

Ratings = how pleasant is the clue (0-100, no repetitions) & condition = CS+ or CS-

res$p.value = as.numeric(res$p.value)
res$p.value = ifelse(res$p.value < 0.05,paste("<span style=\" font-weight: bold; \" >" ,sprintf("%.3f",res$p.value), "</span>"),  paste("<span>" ,sprintf("%.3f",res$p.value), "</span>"))

res$F = unlist(str_split(gsub("[^0-9.,-]", "", res$F), ","));res$pes = unlist(str_split(gsub("[^0-9.,-]", "", res$pes), ","));
res$`90% CI` = paste(sprintf("%.3f",PES.lik[,2]), "-", sprintf("%.3f",PES.lik[,3]))

res$p.value[1]= "<span style=\" font-weight: bold;    \" >\u003C 0.001</span>"
res$pes[c(5,7,8)]= c("\u003C 0.001")
colnames(res)[3:5] = c( paste("F(", res$df[1], ")", sep=""),"&eta;<sub>p</sub><sup>2</sup>", "p")
res[c(1,4,6,3,5)]  %>% kbl(digits = 2, escape = F,row.names = F)  %>%
  kable_styling(latex_options = "striped", position = "center", full_width = F) 
Effect ηp2 90% CI F(1, 43) p
condition .284 0.154 - 0.488 17.05 < 0.001
intervention .069 0.000 - 0.210 3.21 0.080
age .005 0.000 - 0.086 0.22 0.644
gender .054 0.000 - 0.188 2.48 0.123
BMI_V1 < 0.001 0.000 - 0.044 0.03 0.862
session .064 0.000 - 0.233 2.93 0.094
intervention:session < 0.001 0.000 - 0.034 0.02 0.891
intervention:condition < 0.001 0.000 - 0.058 0.06 0.806
session:condition .021 0.000 - 0.138 0.94 0.337
intervention:session:condition .049 0.000 - 0.181 2.23 0.143
#print('PES: intervention: Overall higher weight loss for treament (Liraglutide) group')
#PES.weight[1,]
Model assumptions.Model assumptions.Model assumptions.Model assumptions.

Model assumptions.



Pleasantness Ratings by pavlvovian cue.

Pleasantness Ratings by pavlvovian cue.



Instrumental Conditioning Task (Analysis)

grips = number of times participant exceeded the force threshold to acquire the reward (Milkshake) spline = first 5 trials (1st degree), last 20 trials (2nd degree)

#print('BF10 for model piecewise regression model ')
#BF_fit$BF[2]
BF_fit$Model = c("Factorial early/late Learning Phasis", "Linear Time Fit", "Quadratic Time Fit", "Piecewise Regression with Splines")
BF_fit$BF10 = formatC(BF_fit$BF, format = "e", digits = 2); BF_fit$BF10[1] = 1; BF_fit = BF_fit[-c(2)]
kbl(as_tibble(BF_fit), caption = "Bayesian Model Comparison", digits = 1) %>%   kable_styling(latex_options = "HOLD_position", position = "center", full_width = F)  %>%  row_spec(0,bold=T,align='c')
Bayesian Model Comparison
Model BF10
Factorial early/late Learning Phasis 1
Linear Time Fit 1.41e+06
Quadratic Time Fit 1.47e+04
Piecewise Regression with Splines 1.05e+08



tables <- list.clean(readHTMLTable("tmp/temp3.html"), fun = is.null, recursive = FALSE)
tables2 = tables[[1]] %>% janitor::row_to_names(row_number = 1)

tables2 <- as.matrix(tables2) %>% as_tibble()
tables2[is.na(tables2)] <- ""
tables3 = tables2[1:length(table$Effect),1:4] 
tables3[5] = str_split(gsub("[^0-9.,-]", "", table[3]), ",")[[1]]; tables3[6] = as.numeric(str_split(gsub("[^0-9.,-]", "", table[4]), ",")[[1]]); 
tables3$...6 = ifelse(tables3$...6 < 0.05,paste("<span style=\" font-weight: bold; \" >" ,sprintf("%.3f",tables3$...6), "</span>"),  paste("<span>" ,sprintf("%.3f",tables3$...6), "</span>"))

colnames(tables3)[5] = "\u03C7\u00B2"; colnames(tables3)[6] = "p"
# tables3$p[3]= "<span style=\" font-weight: bold;    \" >\u003C 0.300</span>"
tables3 %>% kbl(caption ="Grips",escape = F ) %>%
  kable_styling(latex_options = "HOLD_position", position = "center", full_width = F) %>%  row_spec(0,bold=T,align='c')
Grips
Predictors Estimates std. Error CI χ² p
intervention [1] 0.32 0.76 -1.17 – 1.80 0.17 0.678
session [1] -0.38 0.38 -1.13 – 0.37 0.98 0.321
age -0.80 0.76 -2.29 – 0.69 1.08 0.300
gender [1] 0.64 0.81 -0.95 – 2.22 0.62 0.432
BMI_V1 -0.82 0.83 -2.44 – 0.80 0.96 0.326
thirsty 1.39 0.65 0.12 – 2.65 4.40 0.036
hungry -0.74 0.70 -2.10 – 0.62 1.06 0.304
intervention [1] *session [1] -0.41 0.39 -1.17 – 0.35 1.09 0.297
session [1] * thirsty -0.72 0.44 -1.58 – 0.14 2.65 0.103
tmp = tables2[(length(table$Effect)+1):(length(table$Effect)+5),1:2]
names(tmp) <- NULL
tmp1 <- data.frame(t(tmp[-1]))
colnames(tmp1) <- tmp[[1]]
tmp1 %>% kbl(digits = 2) %>%
  kable_styling(latex_options = "HOLD_position", position = "center", full_width = F) 
ICC N id N trial Observations Marginal R2 / Conditional R2
0.78 63 24 2640 0.067 / 0.793

Model assumptions.Model assumptions.Model assumptions.Model assumptions.

Model assumptions.



Number of Grips over time by session.

Number of Grips over time by session.



PIT (Pavlovian-Instrumental Transfer) Task

Mobilized effort = Area Under the Curve (AUC) of the force exerted exceeding the delivery threshold during Pavlvovian cue presentation condition = CS+ or CS-


tables <- list.clean(readHTMLTable("tmp/temp4.html"), fun = is.null, recursive = FALSE)
tables2 = tables[[1]] %>% janitor::row_to_names(row_number = 1)

tables2 <- as.matrix(tables2) %>% as_tibble()
tables2[is.na(tables2)] <- ""
tables3 = tables2[1:length(table$Effect),1:4] 
tables3[5] = str_split(gsub("[^0-9.,-]", "", table[3]), ",")[[1]]; tables3[6] = as.numeric(str_split(gsub("[^0-9.,-]", "", table[4]), ",")[[1]]); 
tables3$...6 = ifelse(tables3$...6 < 0.05,paste("<span style=\" font-weight: bold; \" >" ,sprintf("%.3f",tables3$...6), "</span>"),  paste("<span>" ,sprintf("%.3f",tables3$...6), "</span>"))
colnames(tables3)[5] = "\u03C7\u00B2"; colnames(tables3)[6] = "p"
#tables3$p[1]= "<span style=\" font-weight: bold;    \" >\u003C 0.001</span>"
tables3  %>% kbl(caption ="Mobilized effort (a.u.)",escape = F ) %>%
  kable_styling(latex_options = "HOLD_position", position = "center", full_width = F) %>%  row_spec(0,bold=T,align='c')
Mobilized effort (a.u.)
Predictors Estimates std. Error CI χ² p
condition [1] -7.81 3.19 -14.07 – -1.55 5.66 0.017
intervention [1] -5.79 10.01 -25.41 – 13.83 0.33 0.564
session [1] -0.36 7.00 -14.07 – 13.36 0.00 0.959
age 27.40 9.89 8.01 – 46.79 7.08 0.008
gender [1] 3.62 10.34 -16.65 – 23.90 0.10 0.750
BMI_V1 -14.97 10.18 -34.92 – 4.97 2.01 0.157
thirsty 3.25 9.48 -15.33 – 21.82 0.11 0.742
hungry 5.45 9.86 -13.89 – 24.78 0.27 0.601
condition [1] *intervention [1] 0.18 3.19 -6.08 – 6.44 0.00 0.956
condition [1] * session[1] 1.87 2.46 -2.95 – 6.70 0.57 0.450
intervention [1] *session [1] 3.78 6.99 -9.92 – 17.49 0.29 0.589
(condition [1] intervention [1]) session [1] -2.24 2.46 -7.07 – 2.59 0.82 0.366
tmp = tables2[(length(table$Effect)+1):(length(table$Effect)+5),1:2]
names(tmp) <- NULL
tmp1 <- data.frame(t(tmp[-1]))
colnames(tmp1) <- tmp[[1]]
tmp1 %>% kbl(digits = 2) %>%
  kable_styling(latex_options = "HOLD_position", position = "center", full_width = F) 
ICC N id N trialxcondition Observations Marginal R2 / Conditional R2
0.75 64 15 3300 0.073 / 0.771

Model assumptions.Model assumptions.Model assumptions.Model assumptions.

Model assumptions.



Mobilized effort by pavlovian cue.

Mobilized effort by pavlovian cue.



Hedonic Reactivity Test

Perceived liking = how pleasant is the liquid solution rated (0-100, with repetitions) & condition = Milshake or Tasteless & intensity = difference on how intense the liquid solution were rated


tables <- list.clean(readHTMLTable("tmp/temp5.html"), fun = is.null, recursive = FALSE)
tables2 = tables[[1]] %>% janitor::row_to_names(row_number = 1)

tables2 <- as.matrix(tables2) %>% as_tibble()
tables2[is.na(tables2)] <- ""
tables3 = tables2[1:length(table$Effect),1:4] 
tables3[5] = str_split(gsub("[^0-9.,-]", "", table[3]), ",")[[1]]; tables3[6] = as.numeric(str_split(gsub("[^0-9.,-]", "", table[4]), ",")[[1]]); 
tables3$...6 = ifelse(tables3$...6 < 0.05,paste("<span style=\" font-weight: bold; \" >" ,sprintf("%.3f",tables3$...6), "</span>"),  paste("<span>" ,sprintf("%.3f",tables3$...6), "</span>"))
colnames(tables3)[5] = "\u03C7\u00B2"; colnames(tables3)[6] = "p"
tables3$p[1]= "<span style=\" font-weight: bold;    \" >\u003C 0.001</span>"
tables3  %>% kbl(caption ="Perceived liking",escape = F ) %>%
  kable_styling(latex_options = "HOLD_position", position = "center", full_width = F) %>%  row_spec(0,bold=T,align='c')
Perceived liking
Predictors Estimates std. Error CI χ² p
condition [1] -6.57 1.37 -9.25 – -3.89 80.15 < 0.001
intervention [1] -0.18 1.37 -2.87 – 2.50 0.00 0.999
session [1] 2.70 0.89 0.95 – 4.45 0.00 0.999
age 0.69 1.20 -1.67 – 3.05 0.00 0.966
gender [1] -2.34 1.26 -4.81 – 0.13 1.91 0.167
BMI_V1 -0.77 1.24 -3.20 – 1.65 1.60 0.206
thirsty -0.73 1.16 -3.00 – 1.54 11.01 0.001
hungry 2.08 1.18 -0.24 – 4.39 0.85 0.357
int 0.37 1.13 -1.84 – 2.58 0.00 0.999
fam -3.30 1.05 -5.36 – -1.25 3.12 0.077
condition [1] *intervention [1] -0.33 1.37 -3.01 – 2.35 5.40 0.020
condition [1] * session[1] -1.49 0.70 -2.87 – -0.12 0.15 0.700
intervention [1] *session [1] -0.67 0.90 -2.43 – 1.09 0.00 0.999
(condition [1] intervention [1]) session [1] 0.19 0.70 -1.19 – 1.57 0.62 0.431
tmp = tables2[(length(table$Effect)+1):(length(table$Effect)+5),1:2]
names(tmp) <- NULL
tmp1 <- data.frame(t(tmp[-1]))
colnames(tmp1) <- tmp[[1]]
tmp1 %>% kbl(digits = 2) %>%
  kable_styling(latex_options = "HOLD_position", position = "center", full_width = F) 
ICC N id N trialxcondition Observations Marginal R2 / Conditional R2
0.74 64 20 4400 0.156 / 0.779

Model assumptions.Model assumptions.Model assumptions.Model assumptions.

Model assumptions.



Perceived liking (Taste) by solution.

Perceived liking (Taste) by solution.



fMRI Analysis

check out “analysis_LIRA_fMRI.R” for more details

Contrast Post > Pre in HF

res$p.value = as.numeric(res$p.value)
res$p.value = ifelse(res$p.value < 0.05,paste("<span style=\" font-weight: bold; \" >" ,sprintf("%.3f",res$p.value), "</span>"),  paste("<span>" ,sprintf("%.3f",res$p.value), "</span>"))

res$F = unlist(str_split(gsub("[^0-9.,-]", "", res$F), ","));res$pes = unlist(str_split(gsub("[^0-9.,-]", "", res$pes), ","));
res$`90% CI` = paste(sprintf("%.3f",PES.hf[,2]), "-", sprintf("%.3f",PES.hf[,3]))

res$p.value[1]= "<span style=\" font-weight: bold;    \" >\u003C 0.001</span>"
#res$pes[c(5,7,8)]= c("\u003C 0.001")
colnames(res)[3:5] = c( paste("F(", res$df[1], ")", sep=""),"&eta;<sub>p</sub><sup>2</sup>", "p")
res[c(1,4,6,3,5)]  %>% kbl(digits = 2, escape = F,row.names = F)  %>%
  kable_styling(latex_options = "striped", position = "center", full_width = F) 
Effect ηp2 90% CI F(1, 38) p
intervention .345 0.145 - 0.498 20.01 < 0.001
BMI_diff .119 0.007 - 0.281 5.14 0.029
age .171 0.027 - 0.337 7.84 0.008
#print('PES: intervention: Overall higher weight loss for treament (Liraglutide) group')
#PES.weight[1,]
Model assumptions.Model assumptions.Model assumptions.Model assumptions.

Model assumptions.



Beta estimates from hippocampal formation during Hedonic reactivity test (Post > Pre) by intervention and correlation with weight loss.

Beta estimates from hippocampal formation during Hedonic reactivity test (Post > Pre) by intervention and correlation with weight loss.


Mediation Analysis: DV = Weight loss, IV = HF activity during reward consumption
Estimates 95% CI p
Indirect effect mediated through HF -0.484 (-1.034, -0.045) 0.032
Direct effect 3.226 (2.512, 3.943) < 0.001
Total effect 2.742 (2.073, 3.348) < 0.001
Proportion of effect mediated through HF -0.170
par(mar=c(0,0,0,0)); psych::mediate.diagram(medi, show.c = F, main= "", ylim=c(4.5,7.3))
text(3, 6.5, "A ***",  cex = .8); text(7, 6.5, "B *",  cex = .8);  text(5.8, 4.9, "***",  cex = .8); text(5, 6.7, "AB *",  cex = .8)
Mediation path.

Mediation path.


Beta estimates from hippocampal formation during Hedonic reactivity testby session by intervention.

Beta estimates from hippocampal formation during Hedonic reactivity testby session by intervention.

cairo_pdf('figures/Figure_HED_fmri_HF.pdf')
print(ppp)
dev.off()
## png 
##   2
Beta estimates from OFC during Hedonic reactivity test by session by intervention.

Beta estimates from OFC during Hedonic reactivity test by session by intervention.

cairo_pdf('figures/Figure_HED_fmri_OFC.pdf')
print(ppp)
dev.off()
## png 
##   2